const TOKENKEY = 'accessToken';
const REFRESHTOKENKEY = 'refreshToken';

export function getToken(){
    return localStorage.getItem(TOKENKEY) || '';
}
export function setToken(token,refreshToken){
    localStorage.setItem(TOKENKEY,token);
    localStorage.setItem(REFRESHTOKENKEY,refreshToken);
}
export function getRefreshToken(){
    return localStorage.getItem(REFRESHTOKENKEY) || '';
}
export function clearToken(){
    localStorage.removeItem(TOKENKEY);
    localStorage.removeItem(REFRESHTOKENKEY);
}
export function islogin(){
    let token = getToken();

    if(token){
        return true;
    }else{
        return false;
    }
}
export function isloginBack(){
    let token = getToken();

    if(token){
        return true;
    }else{
        return false;
    }
}